package edu.whut.mall.portal.mapper;


import edu.whut.mall.portal.vo.GroupBuyRuleDetailVo;
import edu.whut.mall.portal.vo.GroupBuyRuleVo;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * @program: d9lab-mall
 * @description: 自定义的团购功能Mapper
 * @author: Wayne
 * @create: 2020-05-15 19:05
 **/
public interface GroupBuyRuleCustomMapper {
    List<GroupBuyRuleVo> listGroupBuyRuleVoByCategoryId(Long categoryId);

    Integer updateSuccessGroupBuyCount(Long ruleId);

    GroupBuyRuleVo selectRuleVoByPrimaryId(Long id);

    Integer updateUserRuleCount(@Param("userId")Long userId, @Param("ruleId")Long ruleId);

    GroupBuyRuleDetailVo getRuleDetailVoByPrimaryKey(Long id);

    List<GroupBuyRuleVo> listGroupBuyRuleVosByProductCategory(Long categoryId);

    List<GroupBuyRuleVo> getGroupBuyRuleVoBySearchingName(String productName);
}
